<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>注册</title>

</head>
<body>
<h1>注册</h1>
<% if (request.getParameter("error") != null) { %>
<p style="color:red;"><%= request.getParameter("error") %></p>
<% } %>
<% if (request.getParameter("message") != null) { %>
<p style="color:green;"><%= request.getParameter("message") %></p>
<% } %>
<form action="register" method="post">
    用户名: <input type="text" name="username" required><br/>
    密码: <input type="password" name="password" required><br/>
    姓名: <input type="text" name="fullName"><br/>
    邮箱: <input type="email" name="email"><br/>
    部门: <input type="text" name="department"><br/>
    职位: <input type="text" name="position"><br/>
    角色:
    <select name="role">
        <option value="EMPLOYEE">员工</option>
        <option value="ADMIN">管理员</option>
    </select><br/>
    <button type="submit">注册</button>
</form>
</body>
</html>
